Total harmonic distortion (thd) controlled clip detector and automatic gain limiter (agl)

ABSTRACT

The disclosed embodiments include an audio amplifier system configured to provide a total harmonic distortion (THD) controlled clip detector and an automatic gain limiter (AGL) solution for a closed-loop amplifier. The audio amplifier system is capable of maintaining high power output without hard distortion (i.e., hard clipping) for providing better acoustics, while preventing damage to the system.

BACKGROUND

The present disclosure relates generally to an audio amplifier. Anamplifier is an electronic device that increases the voltage, current,or power of a signal. Audio amplifiers are used in audio equipment ofall kinds such as speakers, hearing aids, mobile phones, home theatreaudio systems, and electric guitars. When an audio amplifier is pushedto create a signal with more power than its power supply can produce, itwill amplify the signal only up to its maximum capacity, at which pointthe signal simply “cuts” or “clips” at the maximum capacity of theamplifier. The extra signal which is beyond the capability of theamplifier is simply cut off, resulting in a sine wave becoming adistorted square-wave-type waveform, thus causing audio distortions andpotential speaker damage due to bigger averaged output power than thedriven speaker is normally rated.

SUMMARY

In accordance with at least one embodiment of the invention, an audioamplifier system includes an attenuator configured to adjust anelectrical signal to generate an attenuated signal. The attenuator iscoupled to an amplifier that is configured to amplify the attenuatedsignal to generate an amplified signal, and modulate the amplifiedsignal to output a pulse width modulated (PWM) signal. A voltagecontrolled current source (VCCS) is coupled to the amplifier. The VCCSis configured to generate a feedback clip error signal. A clip detectoris configured to generate a clip indication signal indicating targetdistortion level.

In an embodiment, the clip detector includes a sense resistor and anamplifier feedback resistor configured to generate an overdrive voltagebased on the feedback clip error signal. The clip detector also includesa multiplexor configured to select a power supply voltage (PVCC) or apredetermined voltage reference (VREF) as a reference source. A voltagedivider is configured to receive the reference source to generate ascaled reference voltage, and a comparator is configured to compare theoverdrive voltage and the scaled reference voltage to generate arelative overdrive signal. The clip detector may also include adebouncer that is configured to filter the relative overdrive signal toreduce noise and generate the clip indication signal.

In an embodiment, the amplifier is a closed-loop class D amplifierconfigured to receive the attenuated signal, a feedback output signal ofthe amplifier, and the feedback clip error signal as input. In anembodiment, the VCCS is coupled to an input channel of a PWM comparatorof the amplifier, and generates the feedback clip error signal bycomparing an amplified error signal generated by the amplifier to astable reference signal.

In an embodiment, the audio amplifier system includes a gain controlfinite-state-machine (FSM) coupled to the clip detector and configuredto control the attenuator using the clip indication signal. The audioamplifier system may also include a counter configured to count clipevents. Further, in some embodiments, a maximum non-clip power limit ofthe audio amplifier system and/or a total harmonic distortion (THD)output of the audio amplifier system may be controlled by adjusting asense resistor and/or a scaled reference voltage.

The disclosed embodiments further include a method for controlling atotal harmonic distortion output of an audio system. In an embodiment,the method includes generating an amplified error signal, generating afeedback clip error signal by comparing the amplified error signal to astable reference signal, generating an overdrive voltage based on thefeedback clip error signal using a sense resistor and an amplifierfeedback resistor, generating a scaled reference voltage using a voltagedivider and a reference source, generating a relative overdrive signalbased on the overdrive voltage and the scaled reference voltage,generating a clip indication signal by filtering the relative overdrivesignal to reduce noise, and controlling the amplifier maximum outputpower below a controlled target THD level at output based on the clipindication signal.

BRIEF DESCRIPTION OF THE DRAWINGS

For a detailed description of various examples, reference will now bemade to the accompanying drawings in which:

FIG. 1 illustrates an audio amplifier system configured to provide atotal harmonic distortion (THD) controlled clip detector and anautomatic gain limiter (AGL) solution for a closed-loop amplifier inaccordance with an embodiment of the present disclosure;

FIG. 2 illustrates an example of a clip detector according to anembodiment of the disclosure;

FIG. 3 illustrates an audio input signal having a non-clipped portionand a clipped portion according to an embodiment of the disclosure;

FIG. 4 is a chart that illustrates input power versus output power andTHD output in accordance with an embodiment of the present disclosure;and

FIG. 5 is a flowchart that illustrates a method for controlling a THDoutput of an audio system in accordance with an embodiment of thepresent disclosure.

The illustrated figures are only exemplary and are not intended toassert or imply any limitation with regard to the environment,architecture, design, or process in which different embodiments may beimplemented.

DETAILED DESCRIPTION

Current audio amplifier systems provide inadequate clip detectioncapabilities. For example, some will detect critical clipping only for aspecific output level. Some audio amplifier systems are subject to gainmismatching and/or require the use of an additional programmable gainamplifier (PGA) amplifier. Still, some audio amplifier systems aresensitive to pulse-width modulation (PWM) and signal frequencyvariation. In addition, some audio amplifier systems may be sensitive todelay of ramp, driver and PWM comparators.

The disclosed embodiments seek to provide solutions to one or more ofthe above problems associated with current audio amplifier systems, andprovide an audio amplifier system that maintains high power outputwithout hard distortion (i.e., hard clipping) for providing betteracoustics, while preventing damage to the system.

The disclosed embodiments may be applied to an audio amplifier systemfor performing clip detection only and/or may be applied to anintegrated automatic gain limiter (AGL) solution. As one example, thedisclosed embodiments may enable different total harmonic distortion(THD) levels to be chosen when reporting the clip detection on closedloop Class-D amplifiers. In one embodiment, this is done by directlysensing the “overdrive” current at input from a loop clamp. This currentis then fed into a replica resistor to get the effective “overdrivevoltage.” The overdrive voltage is compared to a scaled referencevoltage for relative overdrive to determine the THD level at the deemedclip event.

Referring now to the drawings, FIG. 1 illustrates an audio amplifiersystem 100 configured to provide a total harmonic distortion (THD)controlled clip detector and AGL solution for a closed-loop amplifier inaccordance with an embodiment of the present disclosure. The audioamplifier system 100 may be a standalone component or may be integratedinto another system through an inter-integrated circuit (I2C) businterface 117. In the depicted embodiment, the audio amplifier system100 includes an AGL circuit 101, an amplifier 125, and a clip detector131.

In one embodiment, the AGL circuit 101 includes an attenuator 103 and again control finite-state-machine (FSM) 119. Attenuator 103 is anelectronic device which may reduce the amplitude or power of an audiosignal without causing a significant distortion to its waveform. As willbe further described, the gain control FSM 119 is an electronic devicethat is configured to store the status of the audio amplifier system 100at a given time. The gain control FSM 119 is configured to receive inputsuch as a signal indicating whether an audio signal is being clipped andchange one or more status of the audio amplifier system 100. The gaincontrol FSM 119 may also cause an action or output to take place for anystatus change.

In one embodiment, the amplifier 125 is a class-D amplifier or aswitching amplifier. A class-D amplifier is an electronic amplifier inwhich the amplifying devices (e.g., transistors) operate as electronicswitches, and not as linear gain devices as in other types ofamplifiers. In the depicted embodiment, the amplifier 125 includes anadder 107, an error amplifier 109, a pulse-width modulation (PWM)comparator 110, an H-bridge 111, and a top feedback channel 122. Theadder 107, the error amplifier 109, the PWM comparator 110, the H-bridge111, and the top feedback channel 122 together form a top feedback loop124 of the audio amplifier system 100. As will be further described, theaudio amplifier system 100 also includes a bottom feedback loop 123including a VCCS 113, the adder 107, and the error amplifier 109, andthe bottom feedback channel 121.

As shown in FIG. 1, an audio input signal 102, including positive andnegative signals (102 p and 102 n), is provided to the attenuator 103located in the AGL circuit 101. In one embodiment, during an initialcycle, the attenuator 103 generates an attenuated audio input signal105, including positive and negative signals (105 p and 105 n), from theaudio input signal 102 and provides the attenuated audio input signal105 to the adder 107 of the amplifier 125. The adder 107 receives theattenuated audio input signal 105 and performs a summation of (i) theattenuated audio input signal 105, (ii) a feedback output signal 104,including positive and negative signals (104 p and 104 n) of theamplifier 125, and (iii) a feedback clip error signal 106 includingpositive and negative signals (106 p and 106 n). Both the feedbackoutput signal 104 and the feedback clip error signal 106 may be zeroduring the initial cycle. The adder 107 passes the summed audio inputsignal 108 including positive and negative signals (108 p and 108 n) tothe error amplifier 109. The error amplifier 109 amplifies an errordifference between the feedback output signal 104 and the summed audioinput signal 108 to generate an amplified error signal 112 includingpositive and negative signals (112 p and 112 n). The amplified errorsignal 112 is provided to the PWM comparator 110. The PWM comparator 110compares the amplified error signal 112 to a stable reference (REF)signal 129 (e.g., a reference voltage or a ramp waveform) that isgenerated by a ramp generator 115 to generate a compensating errorsignal 114 (i.e., a compensating error voltage), including positive andnegative signals (114 p and 114 n). The PWM comparator 110 then providesthe compensating error signal 114 to the H-bridge 111. The H-bridge 111includes a pair of switches that reciprocally switch back and forthbetween fully conductive and nonconductive states. The compensatingerror signal 114 causes the switches to switch state to generate thefeedback output signal 104 (i.e., an amplified output pulse train). Thecompensating error signal 114 drives the feedback output signal 104(i.e., output voltage of the amplifier 125) closer to a desired level orstrength. The feedback output signal 104 is provided back to the adder107 through the top feedback channel 122 to be combined with theattenuated audio input signal 105 and the feedback clip error signal106.

As described above, the amplifier 125 performs the amplification in aclosed-loop state, meaning all or a portion of its output is used as itsinput. However, the amplifier 125 may process an audio signal that iswithin its power supply limits in the closed-loop state. If the audioinput signal 102 is larger than an allowed power supply of the amplifier125, a clipping (i.e., hard distortion) occurs and the top feedback loop124 changes to a saturated or opened-loop state. When this occurs, thebottom feedback loop 123 becomes active and changes the amplifier 125 toa closed-loop state again.

In the depicted embodiment, the VCCS 113 is coupled to the input linesof the PWM comparator 110 to receive the amplified error signal 112 (112p and 112 n). The VCCS 113 determines the difference between theamplified error signal 112 and a stable reference signal (e.g., a VREFsignal 116 provided by the ramp generator 115) by performing a summationor a subtraction to generate the feedback clip error signal 106 (e.g.,clip error+ and clip error −). The feedback clip error signal 106 (alsoknown as an overdrive current) represents the audio power outside of theallowed power supply limits of the audio amplifier system 100. The VCCS113 provides the feedback clip error signal 106 (106 p and 106 n) backto the adder 107 through the bottom feedback channel 121. In anembodiment, the VCCS 113 converts the feedback clip error signal 106from a voltage representation to a current representation.

As depicted in FIG. 1, the audio amplifier system 100 includes a clipdetector 131 that is configured to sense the feedback clip error signal106 while it is being sent to the adder 107 in the bottom feedbackchannel 121. As will be further described below, the clip detector 131generates a clip indication signal 132 including clip (132 c) and NotClip (132 nc) signals. The clip detector 131 provides the clipindication signal 132 to the gain control FSM 119 of the AGL circuit101.

The gain control FSM 119 receives the clip indication signal 132,generates a control signal 127 based on the clip indication signal 132,and provides the control signal 127 to the attenuator 103 and, in someembodiments, to the I2C bus interface 117. The attenuator 103 adjuststhe audio input signal 102 going into the amplifier 125 based on thecontrol signal 127. The I2C bus interface 117 enables the audioamplifier system 100 to be integrated with other systems or components,for example, by a serial data line (SDA) for output and a serial clockline (SCL) for input, to further provide an integrated AGL solution.

Additionally, in certain embodiments, the audio amplifier system 100includes a counter 120 coupled to the clip (132 c) line. The clipdetector 131 is configured to send the clip event to the counter 120 toa pin for system level AGL solution which attenuates the input signalexternally or internally thru the I2C bus interface 117. In anembodiment, the counter 120 maintains a count of clip events that occursin the audio amplifier system 100 and may generate a clip warning signal126. In some embodiments, a rising (or falling) edge of the clipindication signals 132 c may trigger the counter 120 to increment itscount.

While not shown in FIG. 1, in an embodiment, the bottom feedback channel121 may also include feedback resistors (Rfb), as shown with the topfeedback channel 122. In some embodiments, the feedback output signal104 may be filtered by a passive low-pass filter to produce an outputaudio signal that is provided to other devices or components, such asspeakers.

Reference is now made to FIG. 2, which illustrates an example of a clipdetector 131 according to an embodiment of the disclosure. In thedepicted embodiment, the clip detector 131 includes an alpha (α)reference scaler 201, a clip error sensor 207, a comparator 211, and adebouncer 213. The alpha (α) reference scaler 201 includes a multiplexer(MUX) 203 and a voltage divider 205. The MUX 203 selects either a PVCC220 (e.g., the power supply of the amplifier 125) or a predeterminedVREF221 as a reference source to be provided to the voltage divider 205.The voltage divider 205 produces a scaled reference voltage 222, whichcan be represented by the formulas α*PVCC or α*VREF (where a representsthe voltage division factor implemented by the voltage divider).

The clip error sensor 207 comprises a sense resistor 209 and anamplifier feedback resistor Rfb 210. As shown in FIG. 1, the senseresistor 209 replicates a current that is equivalent to the feedbackclip error signal 106 and biases the current onto the amplifier Rfb 210to generate an overdrive voltage 223, which can be represented by theformula β*R_(fb). The overdrive voltage 223 represents the voltage inexcess of a maximum non-clip power level.

The comparator 211 receives the scaled reference voltage 222 and theoverdrive voltage 223. The comparator 211 compares the scaled referencevoltage 222 and the overdrive voltage 223 to generate a relativeoverdrive signal 224 to determine the THD output level at the detectedclip event. The relative overdrive signal 224 is fed into the debouncer213. The debouncer 213 filters the relative overdrive signal 224 toreduce noise. The debouncer 213 generates the clip indication signal 132to indicate whether the audio input signal 102 was clipped (as indicatedby clip signal 132 c) to flag clip events or not clipped (as indicatedby not clip signal 132 nc).

In addition to determining whether the audio input signal 102 is clippedor not clipped, in some embodiments, the α coefficient and the βcoefficient can be used to determine a delta (δ) coefficient (e.g.,δ=α/β), which may be used to control the THD of the audio amplifiersystem 100 using the AGL 101. As shown in FIG. 3, the audio input signalhas a non-clipped portion 310 that is within the PVCC of the audioamplifier system 100 and a clipped portion 312 that is outside of thePVCC of the audio amplifier system 100. The clipped portion 312 isrepresented by the formula δ*PVCC, which is the same as α/β*PVCC. Thus,by adjusting the sense resistor, which modifies β, and/or the referencescaling (α), a specific THD output level and output power at clipdetection can be tuned. For example, in one embodiment, if δ is set to0.282, then THD=10%.

FIG. 4 is a chart that illustrates maximum output power versus inputpower and maximum output THD in accordance with an embodiment of thepresent disclosure as clip detecting AGL. The maximum non-clip powerlevel for other types of clip detectors is indicated at level 403. Level406 corresponds to 20% THD where a hard clip will occur as indicated byreference 420. Although not depicted, a harder clipped distortion (e.g.,50% THD) is possible with enough overdrive and when a sinewaveeventually becomes too rectangular shape. As shown in FIG. 4, themaximum non-clip power level 403 is set well below the maximum powerlevel 406 for other types of clip detectors which can only detectcritical clipping and so that there is very small output power andlittle (<1%) THD. For some other clip detectors which are sensitive tosignal or PWM switching frequency for class-D amplifier, the THD oroutput power level can even vary and be inconsistent. However, inaccordance with the disclosed embodiments, the maximum non-clip powerlevel and THD output can be controlled as described above. For instance,in the depicted embodiment, for any input power/frequency 401, themaximum non-clip power level has increased from level 403 to level 404independent of signal or PWM switching frequency for class-D amplifier.Range 405 indicates the increased amount in the maximum non-clip power.Range 410 indicates the controllable range of the disclosed embodiments.Therefore, the disclosed embodiments are able to control the audioamplifier system to produce a desired power output and THD output level.

FIG. 5 is a flowchart that illustrates a method 500 for controlling atotal harmonic distortion output of an audio system in accordance withan embodiment of the present disclosure. In the depicted embodiment, themethod 500 begins by generating an amplified error signal at step 502.In some embodiments, the method may further include the step ofreceiving a summed audio input signal comprising an attenuated audioinput signal, an amplifier feedback output signal, and a feedback cliperror signal for generating the amplified error signal. At step 504, themethod generates a feedback clip error signal by comparing the amplifiederror signal to a stable reference signal. The method generates anoverdrive voltage (β*R_(fb)) based on the feedback clip error signalusing a sense resistor and a feedback resistor at step 506. At step 508,the method generates a scaled reference voltage (α*PVCC or α*VREF) usinga voltage divider and a reference source. As mentioned above, arepresents the voltage division factor implemented by the voltagedivider. At step 510, the method generates a relative overdrive signalbased on the overdrive voltage and the scaled reference voltage. Themethod generates a clip indication signal by filtering the relativeoverdrive signal to reduce noise at step 512. At step 514, the methodcontrols an output power and THD based on the clip indication signal. Insome embodiments, the method may further include the step of modifyingthe clip indication signal by adjusting at least one of the senseresistor and the scaled reference voltage.

The advantages of the disclosed embodiments include, but are not limitedto, larger output power over other types of clip detectors and non-clipdetectors (e.g., 20%-50% higher than a non-clip detector). Further, theclipped output power portion may be controllable by THD level (e.g., 2%5% 10% or higher) and in certain embodiments, the audio amplifier systemis independent of the audio input signal frequency (Fsig), the PVCC ofthe amplifier, and switching frequency (Fsw).

The above discussion is meant to be illustrative of the principles andvarious embodiments of the present invention. Numerous variations andmodifications will become apparent to those skilled in the art once theabove disclosure is fully appreciated. It is intended that the followingclaims be interpreted to embrace all such variations and modifications.

As used in the written description and the claims, the terms “including”and “comprising,” and variations thereof, should be interpreted to mean“including, but not limited to.” Unless otherwise specified, the term“couple” or “couples” is not limited to a direct connection, but insteadmay include an indirect connection via other devices or components.

1. An audio amplifier system comprising: an attenuator configured toadjust an electrical signal to generate an attenuated signal; anamplifier coupled to the attenuator and configured to amplify andmodulate the attenuated signal; a voltage controlled current source(VCCS) coupled to the amplifier and configured to generate a feedbackclip error signal; a clip detector configured to generate a clipindication signal, wherein the clip detector comprises: a sense resistorand a feedback resistor configured to generate an overdrive voltagebased on the feedback clip error signal; a multiplexer configured toselect one of a power supply voltage (PVCC) and a predetermined voltagereference (VREF) as a reference source; a voltage divider configured toreceive the reference source to generate a scaled reference voltage; anda comparator configured to compare the overdrive voltage and the scaledreference voltage to generate a relative overdrive signal.
 2. The audioamplifier system of claim 1, wherein the clip detector further comprisesa debouncer configured to filter the relative overdrive signal to reducenoise and generate the clip indication signal.
 3. The audio amplifiersystem of claim 1, wherein the amplifier is a closed-loop class Damplifier configured to receive the attenuated signal, a feedback outputsignal of the amplifier, and the feedback clip error signal as input. 4.The audio amplifier system of claim 1, wherein the VCCS is coupled to aninput channel of a PWM comparator of the amplifier.
 5. The audioamplifier system of claim 1, wherein the VCCS generates the feedbackclip error signal by comparing an amplified error signal generated bythe amplifier to a stable reference signal.
 6. The audio amplifiersystem of claim 1, further comprising a gain controlfinite-state-machine (FSM) coupled to the clip detector and configuredto control the attenuator using the clip indication signal.
 7. The audioamplifier system of claim 6, wherein at least one of the sense resistorand the scaled reference voltage are adjustable to control theattenuator to increase or decrease a maximum power limit thatcorresponds to allowed total harmonic distortion (THD) level of theaudio amplifier system at output.
 8. A clip detector comprising: a senseresistor and a feedback resistor configured to generate an overdrivevoltage based on a feedback clip error signal; a multiplexer configuredto select one of a power supply voltage (PVCC) and a predeterminedvoltage reference (VREF) as a reference source; a voltage dividerconfigured to receive the reference source to generate a scaledreference voltage; a comparator configured to compare the overdrivevoltage and the scaled reference voltage to generate a relativeoverdrive signal; and a debouncer configured to filter the relativeoverdrive signal to reduce noise and generate a clip indication signal.9. The clip detector of claim 8, wherein the sense resistor isconfigured to receive the feedback clip error signal from a voltagecontrolled current source (VCCS) coupled to an amplifier.
 10. The clipdetector of claim 8, wherein the debouncer is configured to send theclip indication signal to a gain control finite-state machine (FSM) ofan automatic gain limiter (AGL) circuit.
 11. The clip detector of claim8, wherein at least one of the sense resistor and the scaled referencevoltage are adjustable to control a total harmonic distortion (THD). 12.(canceled)
 13. An audio amplifier system comprising: an attenuatorconfigured to adjust an electrical signal to generate an attenuatedsignal; a closed-loop class D amplifier configured to receive theattenuated signal, a feedback output signal of the closed-loop class Damplifier, and a feedback clip error signal as input; a voltagecontrolled current source (VCCS) coupled to the closed-loop class Damplifier and configured to generate the feedback clip error signal; anda clip detector configured to receive the feedback clip error signal,and generate a clip indication signal; wherein the clip detectorcomprises: a sense resistor and a feedback resistor configured togenerate an overdrive voltage based on the feedback clip error signal; amultiplexer configured to select one of a power supply voltage (PVCC)and a predetermined voltage reference (VREF) as a reference source; avoltage divider configured to receive the reference source to generate ascaled reference voltage; a comparator configured to compare theoverdrive voltage and the scaled reference voltage to generate arelative overdrive signal; and a debouncer configured to filter therelative overdrive signal to reduce noise and generate the clipindication signal. 14-17. (canceled)
 18. A method for controlling atotal harmonic distortion output of an audio system, the methodcomprising: generating an amplified error signal; generating a feedbackclip error signal by comparing the amplified error signal to a stablereference signal; generating an overdrive voltage based on the feedbackclip error signal using a sense resistor and a feedback resistor;generating a scaled reference voltage using a voltage divider and areference source; generating a relative overdrive signal based on theoverdrive voltage and the scaled reference voltage; generating a clipindication signal by filtering the relative overdrive signal to reducenoise; and controlling a maximum output power and total harmonicdistortion (THD) through internal or external signal attenuation basedon the clip indication signal.
 19. The method of claim 18, receiving asummed audio input signal comprising an attenuated audio input signal,an amplifier feedback output signal, and a feedback clip error signalfor generating the amplified error signal.
 20. The method of claim 18,further comprising modifying the clip indication signal by adjusting atleast one of the sense resistor and the scaled reference voltage.